<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>{{title}} - RedKindle</title>
    <meta name="description" content="RedKindle is a service for Amazon Kindle owners that lets you aggregate feeds you chosen and have them delivered to your Kindle in a convenient, easy-to-navigate format." />
    <link rel="stylesheet" href="/static/base.css" type="text/css" charset="utf-8"/>
    {% block cssfiles %}{% endblock %}
    {% block css %}{% endblock %}
    {% block jsfiles %}{% endblock %}
    {% block js %}{% endblock %}
</head>
{% block bodytag %}
<body>
{% endblock %}
    <div id="header">
        {% block header %}
        <h1><a href="/">RedKindle</a></h1>
        {% if nickname %}
          <a class="nav" href="/logout">退出</a>
	  <span style="color: #ccc;">&bull;</span>
	  <span><a target="_blank" href="/help">帮助</a></span>
          <span style="color: #ccc;">&bull;</span>
        <span>Hello, <a href="#"><strong>{{nickname}}</strong></a></span>
	{% else %}
		<span><a target="_blank" href="/help">帮助</a></span>
		<span style="color: #ccc;">&bull;</span>
		<span><a href="/login">登录</a></span>
        {% endif %}
        <div class="clear"></div>
        {% endblock %}
    </div>
    <div id="menubar">
    {% block menubar %}
    {% if nickname %}
        <h2 id="categoryHeader"> 
        {% if current == "my" %}
        杂志
        {% else %}
        <a style="font-weight:normal;" href="/my">杂志</a>
        {% endif %}
        <span style="color: #ccc;">&bull;</span>
	{% if current == "mysub" %}
	我的订阅
	{% else %}
	<a style="font-weight:normal;" href="/mysub">我的订阅</a>
	{% endif %}
	<span style="color: #ccc;">&bull;</span>
        {% if current == "setting" %}
        设置
        {% else %}
        <a style="font-weight:normal;" href="/setting">设置</a>
        {% endif %}
<!--        <span style="color: #ccc;">&bull;</span>
        {% if current == "logs" %}
        投递日志
        {% else %}
        <a style="font-weight:normal;" href="/logs">投递日志</a>
        {% endif %}-->
        <span style="color: #ccc;">&bull;</span>
        {% if current == "admin" %}
        账户管理
        {% else %}
        <a style="font-weight:normal;" href="/admin">账户管理</a>
        {% endif %}
<!--        <span style="color: #ccc;">&bull;</span>
        {% if current == "feedback" %}
        反馈
        {% else %}
        <a style="font-weight:normal;" href="/feedback">反馈</a>
        {% endif %}i-->
        </h2>
    {% else %}
    	<br/>
        <span style="text-align:center;padding:10px 10px;font-weight:normal;"><a href="/login">登陆</a></span>
	<span style="color: #ccc;">&bull;</span>
	<span style="text-align:center;padding:10px 10px;font-weight:normal;"><a href="/register">注册</a></span>
    {% endif %}
    {% endblock %}
    </div>
    <div id="content">
    {% block content %}
    {% endblock %}
    </div>
    <div id="footer">
        {% block footer %}
        <div class="clear"></div>
        2014 &copy; RedKindle | <a href="https://github.com/ynhacler/Redkindle">Github page</a> | <script type="text/javascript">var cnzz_protocol = (("https:" == document.location.protocol) ? " https://" : " http://");document.write(unescape("%3Cspan id='cnzz_stat_icon_1000291091'%3E%3C/span%3E%3Cscript src='" + cnzz_protocol + "s23.cnzz.com/z_stat.php%3Fid%3D1000291091%26show%3Dpic1' type='text/javascript'%3E%3C/script%3E"));</script>
        {% endblock %}
    </div>
</body>
</html>
